[Fleet] only auto-install content packages newer than the installed version#262509
Conversation
|
Pinging @elastic/fleet (Team:Fleet) |
ApprovabilityVerdict: Needs human review This PR changes the runtime behavior of when content packages get auto-installed, switching from version mismatch detection to semantic version comparison to prevent downgrades. While the change is focused and well-tested, it modifies package installation decision logic that could affect production deployments, and the author is not a designated owner of the Fleet files being changed. You can customize Macroscope's approvability policy. Learn more. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
|
|
Starting backport for target branches: 9.2, 9.3 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…ersion Backport of elastic#262509 to 9.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ersion Backport of elastic#262509 to 9.3 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backport of elastic#262509 test changes to 9.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backport of elastic#262509 test changes to 9.3 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lled version (#262704) ## Summary Backport of #262509 to 9.3. The auto-install content packages task was using string equality (`!== version`) to decide whether to reinstall a package. This meant any version mismatch would trigger a reinstall, effectively downgrading packages. The fix replaces string equality with `semverGt` to ensure a package is only installed when the registry version is strictly newer than the installed version. <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-10T14:55:34Z","message":"[Fleet] only auto-install content packages newer than the installed version (#262509)","sha":"3f939ce873bcbba27b7ccfd44093aa2198bcc743"},"sourcePullRequest":{"number":262509,"url":"https://github.com/elastic/kibana/pull/262509"},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.4","state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…lled version (#262703) ## Summary Backport of #262509 to 9.2. The auto-install content packages task was using string equality (`!== version`) to decide whether to reinstall a package. This meant any version mismatch would trigger a reinstall, effectively downgrading packages. The fix replaces string equality with `semverGt` to ensure a package is only installed when the registry version is strictly newer than the installed version. <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"90178898+juliaElastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-04-10T14:55:34Z","message":"[Fleet] only auto-install content packages newer than the installed version (#262509)","sha":"3f939ce873bcbba27b7ccfd44093aa2198bcc743"},"sourcePullRequest":{"number":262509,"url":"https://github.com/elastic/kibana/pull/262509"},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.9","state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
29 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Closes #260677
The auto-install content packages task was using string equality (
!== version) to decide whether to reinstall a package. This meant any version mismatch would trigger a reinstall, effectively downgrading packages. For example, if2.0.0-previewwas installed and the registry listed1.4.0as the latest stable, the task would downgrade to1.4.0.The fix replaces string equality with
semverGtto make sure there are no downgrades happening.A package is now only installed when the registry version is strictly newer than the installed version.
To verify:
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.